﻿<?xml version="1.0" encoding="utf-8" ?>
<FieldTypes>
  <FieldType>
    <Field Name="TypeName">ExtendedLookup</Field>
    <Field Name="TypeDisplayName">Extended Lookup</Field>
    <Field Name="TypeShortDescription">Extended Lookup (information already on this site)</Field>
    <Field Name="InternalType">Lookup</Field>
    <Field Name="SQLType">int</Field>
    <Field Name="ParentType">Lookup</Field>
    <Field Name="FieldTypeClass">CodePlex.ExtendedLookup.ExtendedLookupField, CodePlex.ExtendedLookup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9e777a5ed0e30381</Field>
    <Field Name="FieldEditorUserControl">/_controltemplates/ExtendedLookupFieldEditor.ascx</Field>
    <Field Name="Sortable">FALSE</Field>
    <Field Name="Filterable">TRUE</Field>
    <PropertySchema>
      <Fields>
        <Field Name="LookupViewId"
               DisplayName="The ID of the view to use within the list for the lookup."
               Hidden="TRUE"
               Type="Text">
          <Default></Default>
        </Field>
        <Field Name="AllowMultipleValues"
               DisplayName="Allow multiple values?"
               Hidden="TRUE"
               Type="Boolean">
          <Default>0</Default>
        </Field>
        <Field Name="AddMissingValue"
               DisplayName="Add missing value?"
               Hidden="TRUE"
               Type="Boolean">
          <Default>0</Default>
        </Field>
      </Fields>
    </PropertySchema>
    <RenderPattern Name="HeaderPattern">
      <Switch>
        <Expr>
          <Property Select='Filterable'/>
        </Expr>
        <Case Value="FALSE"> </Case>
        <Default>
          <Switch>
            <Expr>
              <GetVar Name='Filter'/>
            </Expr>
            <Case Value='1'>
              <HTML><![CDATA[<SELECT ID="diidFilter]]></HTML>
              <Property Select='Name'/>
              <HTML>                  <![CDATA[" TITLE=]]></HTML>
              <HTML>"$Resources:core,501;</HTML>
              <Property Select='DisplayName' HTMLEncode='TRUE'/>
              <HTML><![CDATA[" OnChange='FilterField("]]></HTML>
              <GetVar Name="View"/>
              <HTML><![CDATA[",]]></HTML>
              <ScriptQuote>
                <Property Select='Name' URLEncode="TRUE"/>
              </ScriptQuote>
              <HTML><![CDATA[,this.options[this.selectedIndex].value, this.selectedIndex);' dir="]]></HTML>
              <Property Select="Direction" HTMLEncode="TRUE"/>
              <HTML><![CDATA[">]]></HTML>
              <FieldFilterOptions BooleanTrue="$Resources:core,fld_yes;" BooleanFalse="$Resources:core,fld_no;" NullString="$Resources:core,fld_empty;" AllItems="$Resources:core,fld_all;"></FieldFilterOptions>
              <HTML><![CDATA[</SELECT><BR>]]></HTML>
            </Case>
          </Switch>
        </Default>
      </Switch>
      <Switch>
        <Expr>
          <Property Select='Sortable'/>
        </Expr>
        <Case Value="FALSE">
          <Property Select='DisplayName' HTMLEncode="TRUE"/>
        </Case>
        <Default>
          <Switch>
            <Expr>
              <GetVar Name='SortDisable'/>
            </Expr>
            <Case Value='TRUE'>
              <Property Select='DisplayName' HTMLEncode="TRUE"/>
            </Case>
            <Default>
              <HTML><![CDATA[<A ID="diidSort]]></HTML>
              <Property Select='Name'/>
              <HTML>        <![CDATA[" onfocus="OnFocusFilter(this)" TITLE=]]></HTML>
              <HTML>"$Resources:core,500;</HTML>
              <Property Select='DisplayName' HTMLEncode='TRUE'/>
              <HTML><![CDATA[" HREF="javascript:" OnClick="javascript:return OnClickFilter(this,event);" ]]></HTML>
              <HTML><![CDATA[ SORTINGFIELDS="]]></HTML>
              <FieldSortParams HTMLEncode="TRUE"/>
              <HTML><![CDATA[">]]></HTML>
              <Property Select='DisplayName' HTMLEncode="TRUE"/>
              <HTML><![CDATA[<img src="/_layouts/images/blank.gif" class="ms-hidden" border=0 width=1 height=1 alt="]]></HTML>
              <HTML>$Resources:OpenMenuKeyAccessible;</HTML>
              <HTML><![CDATA[">]]></HTML>
              <HTML><![CDATA[</A><IMG SRC="]]></HTML>
              <FieldSortImageURL/>
              <HTML><![CDATA[" ALT="]]></HTML>
              <Switch>
                <Expr>
                  <GetVar Name='SortDir'/>
                </Expr>
                <Case Value='Asc'>
                  <HTML>$Resources:core,150;</HTML>
                </Case>
                <Case Value='Desc'>
                  <HTML>$Resources:core,151;</HTML>
                </Case>
                <Default>
                  <HTML></HTML>
                </Default>
              </Switch>
              <HTML><![CDATA[" BORDER=0>]]></HTML>
            </Default>
          </Switch>
        </Default>
      </Switch>
      <HTML><![CDATA[<IMG SRC="]]></HTML>
      <FieldFilterImageURL/>
      <HTML><![CDATA[" BORDER=0 ALT="">]]></HTML>
    </RenderPattern>
    <RenderPattern Name="DisplayPattern">
      <FieldSwitch>
        <Expr>
          <Property Select="FieldRef"/>
        </Expr>
        <Case Value="">
          <FieldSwitch>
            <Expr>
              <Property Select="CountRelated"/>
            </Expr>
            <Case Value="TRUE">
              <LookupColumn HTMLEncode="TRUE"/>
            </Case>
            <Default>
              <Switch>
                <Expr>
                  <Column/>
                </Expr>
                <Case Value="">
                </Case>
                <Default>
                  <FieldSwitch>
                    <Expr>
                      <Property Select="LookupType"/>
                    </Expr>
                    <Case Value="Computed">
                      <LookupColumn/>
                    </Case>
                    <Default>
                      <HTML><![CDATA[<A HREF="]]></HTML>
                      <URL Cmd="Lookup"/>
                      <HTML><![CDATA[">]]></HTML>
                      <LookupColumn HTMLEncode="TRUE"/>
                      <HTML><![CDATA[</A>]]></HTML>
                    </Default>
                  </FieldSwitch>
                </Default>
              </Switch>
            </Default>
          </FieldSwitch>
        </Case>
        <Default>
          <LookupColumn HTMLEncode="TRUE"/>
        </Default>
      </FieldSwitch>
    </RenderPattern>
    <RenderPattern Name="EditPattern">
      <HTML><![CDATA[<SCRIPT>fld = new Field(frm,]]></HTML>
      <ScriptQuote>
        <Property Select="Name"/>
      </ScriptQuote>
      <HTML>,</HTML>
      <ScriptQuote>
        <Property Select="DisplayName"/>
      </ScriptQuote>
      <HTML><![CDATA[);</SCRIPT>]]></HTML>
      <HTML><![CDATA[<SELECT TITLE="]]></HTML>
      <Property Select="DisplayName"/>
      <HTML><![CDATA[" TABINDEX=1 NAME="]]></HTML>
      <FieldPrefix/>
      <Property Select="Name"/>
      <HTML><![CDATA[">]]></HTML>
      <Switch>
        <Expr>
          <Property Select="Required"/>
        </Expr>
        <Case Value="TRUE">
        </Case>
        <Default>
          <HTML><![CDATA[<OPTION Value="">]]></HTML>
          <HTML>$Resources:core,onetfldtypes03;</HTML>
          <HTML><![CDATA[</OPTION>]]></HTML>
        </Default>
      </Switch>
      <SelectOptions  Len="100" MoreText="..."/>
      <HTML><![CDATA[</SELECT>]]></HTML>
    </RenderPattern>
    <RenderPattern Name="NewPattern" DisplayName="NewPattern">
      <HTML><![CDATA[<SCRIPT>fld = new Field(frm,]]></HTML>
      <ScriptQuote>
        <Property Select="Name"/>
      </ScriptQuote>
      <HTML>,</HTML>
      <ScriptQuote>
        <Property Select="DisplayName"/>
      </ScriptQuote>
      <HTML><![CDATA[);</SCRIPT>]]></HTML>
      <HTML><![CDATA[<SELECT TABINDEX=1 NAME="]]></HTML>
      <FieldPrefix/>
      <Property Select="Name"/>
      <HTML><![CDATA[">]]></HTML>
      <Switch>
        <Expr>
          <Property Select="Required"/>
        </Expr>
        <Case Value="TRUE">
        </Case>
        <Default>
          <HTML><![CDATA[<OPTION Value="">]]></HTML>
          <HTML>$Resources:core,onetfldtypes03;</HTML>
          <HTML><![CDATA[</OPTION>]]></HTML>
        </Default>
      </Switch>
      <SelectOptions Len="100" MoreText="..."/>
      <HTML><![CDATA[</SELECT>]]></HTML>
    </RenderPattern>
    <RenderPattern Name="PreviewDisplayPattern">
      <HTML><![CDATA[["]]></HTML>
      <Property Select="DisplayName" HTMLEncode="TRUE"/>
      <HTML>"$Resources:core,fldtypes011;</HTML>
    </RenderPattern>
    <RenderPattern Name="PreviewEditPattern">
      <Switch>
        <Expr>
          <Property Select="Format"/>
        </Expr>
        <Case Value="RadioButtons">
          <HTML><![CDATA[<table cellpadding="0" cellspacing="1">]]></HTML>
          <SetVar Name="_ChoiceDefault">
            <Property Select="Default"/>
          </SetVar>
          <ForEach Select="CHOICES/CHOICE">
            <HTML><![CDATA[<tr><td vAlign="top"> <input type="radio"]]></HTML>
            <IfEqual>
              <Expr1>
                <Property Select="."/>
              </Expr1>
              <Expr2>
                <GetVar Name="_ChoiceDefault"/>
              </Expr2>
              <Then>
                <HTML><![CDATA[ checked]]></HTML>
              </Then>
            </IfEqual>
            <HTML><![CDATA[></td><td class="ms-RadioText" vAlign="top">]]></HTML>
            <Property Select="." HTMLEncode="TRUE"/>
            <HTML><![CDATA[</td></tr>]]></HTML>
          </ForEach>
          <Switch>
            <Expr>
              <Property Select="FillInChoice"/>
            </Expr>
            <Case Value="TRUE">
              <HTML><![CDATA[<tr><td vAlign="top"> <input type="radio"></td><td class="ms-RadioText" vAlign="top">]]></HTML>
              <HTML>$Resources:core,fldtypes018;</HTML>
              <HTML><![CDATA[</td></tr><tr><td vAlign="top"></td><td class="ms-RadioText" vAlign="top"> <input class="ms-input" value=""></td></tr>]]></HTML>
            </Case>
          </Switch>
          <HTML><![CDATA[</table>]]></HTML>
        </Case>
        <Default>
          <Switch>
            <Expr>
              <Property Select="FillInChoice"/>
            </Expr>
            <Case Value="TRUE">
              <HTML><![CDATA[<table><tr><td vAlign="top"> <input type="radio"></td><td class="ms-RadioText" vAlign="top">]]></HTML>
              <HTML><![CDATA[<select><option selected>"]]></HTML>
              <Property Select="DisplayName" HTMLEncode="TRUE"/>
              <HTML>"$Resources:core,fldtypes012;</HTML>
              <HTML><![CDATA[</option></select>]]></HTML>
              <HTML><![CDATA[</td></tr>]]></HTML>
              <HTML><![CDATA[<tr><td vAlign="top"> <input type="radio"></td><td class="ms-RadioText" vAlign="top">]]></HTML>
              <HTML>$Resources:core,fldtypes018;</HTML>
              <HTML><![CDATA[</td></tr><tr><td vAlign="top"></td><td class="ms-RadioText" vAlign="top"> <input class="ms-input" value=""></td></tr></table>]]></HTML>
            </Case>
            <Default>
              <HTML><![CDATA[<select><option selected>"]]></HTML>
              <Property Select="DisplayName" HTMLEncode="TRUE"/>
              <HTML>"$Resources:core,fldtypes012;</HTML>
              <HTML><![CDATA[</option></select>]]></HTML>
            </Default>
          </Switch>
        </Default>
      </Switch>
    </RenderPattern>
    <RenderPattern Name="PreviewNewPattern">
      <Switch>
        <Expr>
          <Property Select="Format"/>
        </Expr>
        <Case Value="RadioButtons">
          <HTML><![CDATA[<table cellpadding="0" cellspacing="1">]]></HTML>
          <SetVar Name="_ChoiceDefault">
            <Property Select="Default"/>
          </SetVar>
          <ForEach Select="CHOICES/CHOICE">
            <HTML><![CDATA[<tr><td vAlign="top"> <input type="radio"]]></HTML>
            <IfEqual>
              <Expr1>
                <Property Select="."/>
              </Expr1>
              <Expr2>
                <GetVar Name="_ChoiceDefault"/>
              </Expr2>
              <Then>
                <HTML><![CDATA[ checked]]></HTML>
              </Then>
            </IfEqual>
            <HTML><![CDATA[></td><td class="ms-RadioText" vAlign="top">]]></HTML>
            <Property Select="." HTMLEncode="TRUE"/>
            <HTML><![CDATA[</td></tr>]]></HTML>
          </ForEach>
          <Switch>
            <Expr>
              <Property Select="FillInChoice"/>
            </Expr>
            <Case Value="TRUE">
              <HTML><![CDATA[<tr><td vAlign="top"> <input type="radio"></td><td class="ms-RadioText" vAlign="top">]]></HTML>
              <HTML>$Resources:core,fldtypes018;</HTML>
              <HTML><![CDATA[</td></tr><tr><td vAlign="top"></td><td class="ms-RadioText" vAlign="top"> <input class="ms-input" value=""></td></tr>]]></HTML>
            </Case>
          </Switch>
          <HTML><![CDATA[</table>]]></HTML>
        </Case>
        <Default>
          <Switch>
            <Expr>
              <Property Select="FillInChoice"/>
            </Expr>
            <Case Value="TRUE">
              <HTML><![CDATA[<table><tr><td vAlign="top"> <input type="radio"></td><td class="ms-RadioText" vAlign="top">]]></HTML>
              <HTML><![CDATA[<select><option selected>"]]></HTML>
              <Property Select="DisplayName" HTMLEncode="TRUE"/>
              <HTML>"$Resources:core,fldtypes012;</HTML>
              <HTML><![CDATA[</option></select>]]></HTML>
              <HTML><![CDATA[</td></tr>]]></HTML>
              <HTML><![CDATA[<tr><td vAlign="top"> <input type="radio"></td><td class="ms-RadioText" vAlign="top">]]></HTML>
              <HTML>$Resources:core,fldtypes018;</HTML>
              <HTML><![CDATA[</td></tr><tr><td vAlign="top"></td><td class="ms-RadioText" vAlign="top"> <input class="ms-input" value=""></td></tr></table>]]></HTML>
            </Case>
            <Default>
              <HTML><![CDATA[<select><option selected>"]]></HTML>
              <Property Select="DisplayName" HTMLEncode="TRUE"/>
              <HTML>"$Resources:core,fldtypes012;</HTML>
              <HTML><![CDATA[</option></select>]]></HTML>
            </Default>
          </Switch>
        </Default>
      </Switch>
    </RenderPattern>
  </FieldType>
  <FieldType>
    <Field Name="TypeName">ExtendedLookupMulti</Field>
    <Field Name="ParentType">ExtendedLookup</Field>
    <Field Name="TypeDisplayName">Extended Lookup</Field>
    <Field Name="TypeShortDescription">Extended Lookup (information already on this site)</Field>
    <Field Name="UserCreatable">FALSE</Field>
    <Field Name="Sortable">FALSE</Field>
    <Field Name="Filterable">TRUE</Field>
  </FieldType>
</FieldTypes>